<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script>
        function f1(){
            // window.location="2.html";
            window.opener.location="2.html";
        }
    </script>

</head>
<body>
    <h1>1.html</h1>

    <a href="javascript:;" onclick="f1();">test</a>
</body>
</html>